Next: , Previous: RPN Answer 3, Up: Answers to Exercises


3.7.4 RPN Tutorial Exercise 4

Either ( 2 , 3 ) or ( 2 <SPC> 3 ) would have worked, but using both the comma and the space at once yields:

     1:  ( ...      2:  ( ...      1:  (2, ...    2:  (2, ...    2:  (2, ...
         .          1:  2              .          1:  (2, ...    1:  (2, 3)
                        .                             .              .

         (              2              ,             <SPC>            3 )

Joe probably tried to type <TAB> <DEL> to swap the extra incomplete object to the top of the stack and delete it. But a feature of Calc is that <DEL> on an incomplete object deletes just one component out of that object, so he had to press <DEL> twice to finish the job.

     2:  (2, ...    2:  (2, 3)     2:  (2, 3)     1:  (2, 3)
     1:  (2, 3)     1:  (2, ...    1:  ( ...          .
         .              .              .

                       <TAB>            <DEL>            <DEL>

(As it turns out, deleting the second-to-top stack entry happens often enough that Calc provides a special key, M-<DEL>, to do just that. M-<DEL> is just like <TAB> <DEL>, except that it doesn't exhibit the “feature” that tripped poor Joe.)